package com.itheima.swagger.controller;

import com.itheima.swagger.entity.Student;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(value = "ahahah",description = "HelloController测试",tags = "HelloController测试")
public interface HelloControllerInterface {

    @ApiOperation("对方法功能描述,无参测试")
    String hello();


    @ApiImplicitParam(name = "num", value = "编号", required = true, paramType = "query")
    Student modifyStudentNum(@RequestParam("num") String num);


    @ApiImplicitParam(name = "name", value = "名称", required = true, paramType = "path")
    Student modifyStudentName(@PathVariable("name") String name);


    @ApiImplicitParam(name = "student", value = "这是个啥", required = true, paramType = "body")
    Student modifyStudent(@RequestBody Student student);

    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "编号", required = true, paramType = "path", dataType = "string"),
            @ApiImplicitParam(name = "name", value = "名称", required = true, paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "student", value = "对象", required = true, dataType = "Student", paramType = "body")
    })
    Student mofidyStudentBynNum(@PathVariable("id") String id, @RequestParam("name") String name, @RequestBody Student student);
}
